package s02;


/**
 * @ClassName Test
 * @Description 测试类
 * @Author Li
 * @Date 2022/8/8 9:58
 * @ModifyDate 2022/8/8 9:58
 * @Version 1.0
 */
public class Test {
    public static void main(String[] args) {
        // 创建线程任务对象
        SellTicket sell = new SellTicket();
        // 创建三个同时卖票窗口对象
        Thread thread1 = new Thread(sell, "窗口一");
        Thread thread2 = new Thread(sell, "窗口二");
        Thread thread3 = new Thread(sell, "窗口三");

        // 同时卖票
        thread1.start();
        thread2.start();
        thread3.start();
    }
}
